import ReceiveMessage from "./Chat/Event/ReceiveMessage";
// import IEvent from "./Chat/Contract/IEvent";
import ServerInit from "./Chat/Event/ServerInit";
import ServerSendMessage from "./Chat/Event/ServerSendMessage";
import IRefrence from "./IRefrence";
import LoginHandle from "./Chat/Event/LoginHandle";

class EventMap {

    static CALL_BACK:{[name: string]: IRefrence} = {
        "server.receiveMessage": ReceiveMessage,
        "server.initChat": ServerInit,
        "server.sendMessage": ServerSendMessage,
        "login.handle": LoginHandle
    }

    public static getCallBack(name:string): IRefrence{
        return EventMap.CALL_BACK[name];
    }
}

// interface da {
//     [name: string]:string| number,
//     follover: string,
//     fruit: string,
//     tomato:string,
//     num: number
// }

// interface List {
//      data: da[],

     
//     get() : da[];
     
// }

// class  fff implements List {
//      public data: da[];
    
//     constructor (data: da[]) {
//         this.data = data;
//     }

//     get() : da[] {
//         return this.data;
//     }
// }


// let dataS:da = {
//     name: "小骚逼",
//     follover: "肖碧碧",
//     fruit: "hsjkh",
//     tomato: "red",
//     num: 6
// };

// for( let i in dataS) {
//     console.log(dataS[i])
// }



export default EventMap;